count($x$ $<$ $y$ in $L$ $\mid$ $P$($x$;$y$)) \\[0ex]$\,\equiv$$_{\mbox{\scriptsize def}}$$\;\;$sum(if $i$$<_{2}$$j$ $\wedge_{2}$ $P$($L$[$i$];$L$[$j$])$\rightarrow$ 1 else 0 fi $\mid$ $i$ $<$ $\parallel$$L$$\parallel$; $j$ $<$ $\parallel$$L$$\parallel$)